Video cameras may be used for different applications. For example, video cameras may be used for automotive applications such as forward collision warning and night vision applications that are targeted at scenes with a poor distribution of pixels across the graycode range. Night-time scenes, which are mostly dark but include a few headlights, and scenes, which are part indoor and part outdoor, typically show a very poor distribution of graycodes.
There are several existing techniques that can be used to enhance the contrast of monochrome images. For example, Histogram Specification (HSp) is a common contrast enhancement technique that operates based on a predefined histogram. In particular, input pixels of an image are manipulated so that output pixel values match, as closely as possible, the predefined histogram. Histogram Equalization (HEq) is a special case of HSp in which the predefined histogram has an equal number of pixels in each bin.
Another common contrast enhancement technique is known as Black Point/White Point Correction (BP/WP). This linear technique includes an offset operation followed by a linear gain operation. The offset is calculated such that a certain percentage of the darkest pixel is mapped to zero output. The gain factor is calculated so that a certain percentage of the brightest post-offset pixel maps to a saturated value on the output.
While HSp and HEq provide results that are superior to BP/WP, they require significantly more computational power to calculate the various factors necessary to perform the operations. BP/WP has lower computational requirements but it does not always provide an adequate enhancement.